package com.sgq.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sgq.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sgq.vo.RoleQueryVo;
import com.sgq.vo.UserQueryVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sgq
 * @since 2024-09-13
 */
public interface RoleService extends IService<Role> {

    IPage<Role> findPage(RoleQueryVo roleQueryVo);


    /**
     * 根据角色id删除角色和权限的关联关系
     * @param id
     * @return
     */
    boolean removeRoleAndRelationship(Long id);

    /**
     * 保存角色权限关系
     * @param roleId
     * @param permissionIds
     * @return
     */
    boolean saveRolePermission(Long roleId, List<Long> permissionIds);
}
